<%--
  Created by IntelliJ IDEA.
  User: 19296
  Date: 2021/10/29
  Time: 16:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>本店评论</title>
    <link type="text/css" rel="stylesheet" href="../fontsawesome/css/font-awesome.css"/>
    <link type="text/css" rel="stylesheet" href="../css/style.css"/>
</head>
<body>
<div class="main_box">
    <h2><span></span>全部评论</h2>
    <div class="cont_box">
        <form action="${pageContext.request.contextPath}/findHpMen" method="post" id="staff_form">
            <table border="0" cellspacing="0" cellpadding="0" class="table" id="table_box">
                <thead>
                <tr>
                    <th>门店</th>
                    <th>评价时间</th>
                    <th>评价内容</th>
                    <th>评分</th>
                    <th width="268">操作</th>
                </tr>
                </thead>
                <tbody>

                <c:forEach items="${list}" var="coment">
                    <tr id="1"><!--此处id为进行编辑或删除时该条数据的唯一标识-->
                        <td>${coment.shop_name}</td>

                        <td><fmt:formatDate value="${coment.c_time}"/></td>
                        <td>
                            <div class="comment_text">${coment.p_content}</div>
                        </td>
                        <td>${coment.grade}</td>
                        <td>
                            <a href="${pageContext.request.contextPath}/findByIdComentMen?rid=${coment.rid}"
                               class="table_btn table_info see_btn">
                                <i class="fa fa-eye"></i>
                                <span>查看</span>
                            </a>
                        </td>
                    </tr>
                </c:forEach>

                </tbody>
            </table>
        </form>
    </div>
</div>
<!--javascript include-->
<script src="../js/jquery-2.2.1.min.js"></script>
<script src="../js/jquery.dataTables.min.js"></script>
<script src="../js/bootstrap-datepicker.js"></script>
<script src="../js/jquery.validate.min.js"></script>
<script src="../js/other.js"></script>
<script>
    $(function () {
        $("body").other({tableId: "#table_box", tableWrap: [3, 5, 6], tableAas: [0, "desc"]});
        $("body").tipWindow({
            method: "edit",
            Class: ".see_btn",
            even: "click",
            tipTit: "评价详情",
            Twidth: "700",
            Theight: "300",
            editUrl: "#"
        });//editUrl 编辑请求地址
        //评论筛选
        $(".search_formbox .btn").click(function () {
            var dataId = $(this).prop("id"),//评价等级id
                that = $(this);
            $.ajax({
                type: "post",
                url: "#",
                data: "id=dataId",
                success: function (data) {
                    that.addClass("curr").siblings().removeClass("curr");
                }
            });
        });
    });
</script>
</body>
</html>
